Embodiments of the present invention relate to service-oriented computing, and more particularly relate to techniques for pausing an instance of a service-oriented application.
In recent years, many organizations have adopted Service-Oriented Architecture (SOA) for building and integrating their business applications. Generally speaking, SOA is a software model that encapsulates business functionality into a collection of modular software components, known as services. Each service exposes a well-defined interface that is independent of the service's underlying implementation (e.g., hardware/software platform, programming language, etc.). Using these interfaces, the various services can interact to provide services to, and consume services from, each other.
One advantage of the SOA paradigm is that business applications can be structured as compositions of one or more component services. These types of applications are referred to herein as service-oriented applications. For example, a service-oriented application for carrying out an order fulfillment business process may be structured as a composition of (1) an internal query service for retrieving the details of a customer order, (2) an external credit service for checking the customer's credit, (3) an internal inventory service for reserving the items included in the order, and (4) an external shipping service for processing shipment. The structural definition of a service-oriented application (including, for example, the types of services accessed, the sequencing of service operation invocations, fault handling, etc.) is typically expressed in an orchestration language, such as Business Process Execution Language (BPEL). A BPEL-based definition of a service-oriented application is known as a BPEL process.
In many instances, it may be desirable to suspend, or pause, the runtime flow of a BPEL process until one or more business conditions have been satisfied. For example, in the order fulfillment application above, it may be desirable to wait for verification that the customer's credit is satisfactory, and/or wait for confirmation that the customer's order items have been reserved, before proceeding to ship the order. According to one known approach, this “pausing” functionality can be implemented by using a synchronized message exchange between the BPEL process and the entities responsible for generating status information relevant to the business conditions (referred to herein as “event producers”). In this type of implementation, the BPEL process invokes an event producer and waits for an indication from the event producer that the business condition is satisfied before proceeding to the next task or step.
One problem with the above approach is that it requires the BPEL process to wait for responses from event producers in a serial fashion. Thus, the application cannot handle multiple simultaneous (or parallel) wait states in a single runtime instance. For example, using a synchronous message exchange pattern, an instance of the order fulfillment application cannot wait for responses from the credit service and the inventory service in parallel; rather, the instance must wait for a response from the credit service, and then wait for a response from the inventory service, or vice versa. This limits the types of task flows that can implemented within the process.